<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@page import="avicit.platform6.core.locale.PlatformLocalesJSTL"%>
<%@page import="java.util.Locale"%>
<%@page import="avicit.platform6.api.session.SessionHelper"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="avicit.platform6.commons.utils.ViewUtil"%>
<%@ taglib prefix="sec" uri="/WEB-INF/tags/shiro.tld"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>权限复制</title>
<base href="<%=ViewUtil.getRequestPath(request)%>">
<%@page import="avicit.platform6.api.sysshirolog.impl.AfterLoginSessionProcess"%>
<% 
Object lang=session.getAttribute(AfterLoginSessionProcess.SESSION_CURRENT_LANGUAGE_CODE);
String languageCode="zh_CN";
if(lang!=null){
	languageCode=lang.toString();
}
	Locale locale =SessionHelper.getLocaleByUser(request);
%>
<link href="static/css/custom/lantop/css/custom.css" type="text/css"  rel="stylesheet">
<jsp:include page="/avicit/platform6/component/common/EasyUIJsInclude.jsp"></jsp:include>
<script type="text/javascript" src="avicit/im/lantop/userauthset/CopyAuth.js"></script>
<jsp:include page="/avicit/platform6/modules/system/commonpopup/commonSelectionHead.jsp"></jsp:include>
<jsp:include page="/avicit/im/common/ImUIJSCSSInclude.jsp"></jsp:include>
<script type="text/javascript" src="avicit/im/lantop/userauthset/locale/language_<%=languageCode%>.js"></script>
<script type="text/javascript">
	targetId = "${targetId}";
	dialogId = "${dialogId}";
	var iframeWidth =  document.documentElement.clientWidth / 2;
	$(function(){
		var layoutDiv = $('#layoutDiv');
		var westDiv = layoutDiv.layout('panel', 'west');
		westDiv.panel('resize', {width: iframeWidth});
		layoutDiv.layout('resize');
	});
</script>
</head>
<body id="layoutDiv" class="easyui-layout">
	<div id="westDiv" data-options="region:'west',split:true" style="width: 200px;">
		<div id="toolbarWaitSelectEntry" class="datagrid-toolbar" style="height: 40px; display: block;">
			<sec:accesscontrollist hasPermission="3" domainObject="userauthset_CopyAuth_button_addwaitUserToTargetUser">
				<%-- 添加 --%>
				<td width="70px;"><a style="margin-top:7px;margin-left:20px;" title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.button.add","i18n.lantop",locale)%>" class="easyui-linkbutton selbtnc" iconCls="icon-im-add"   onclick="addwaitUserToTargetUser();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.button.add","i18n.lantop",locale)%></a></td>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3" domainObject="userauthset_CopyAuth_button_openSearchDialog">
				<%-- 查询 --%>
				<td width="70px;"><a title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.button.search","i18n.lantop",locale)%>" class="easyui-linkbutton selbtnc" iconCls="icon-im-search"  onclick="openSearchDialog();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.button.search","i18n.lantop",locale)%></a></td>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3" domainObject="userauthset_CopyAuth_button_closeWindow">
				<%-- 返回 --%>
				<td width="70px;"><a title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.button.return","i18n.lantop",locale)%>" class="easyui-linkbutton selbtnc" iconCls="icon-im-back"  onclick="closeWindow();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.button.return","i18n.lantop",locale)%></a></td>
			</sec:accesscontrollist>
		</div>
		<!-- 待选择用户 begin -->
		<table id="waitUserDatagrid" class="easyui-datagrid" data-options="
						url: 'platform/UserAuthSetController/getAllUser?targetId=${targetId }',
						animate: false,
						collapsible: false,
						fitColumns: true,
						autoRowHeight: false,
						singleSelect: false,
						pagination:true,
						pageNumber:0,
						pageSize:10, 
						pageList:[10,15,30,50,100],
			    		striped:true,
						fit:true,
						toolbar:'#toolbarWaitSelectEntry',
						method: 'post'
					">
			<thead>
				<tr>
					<sec:accesscontrollist hasPermission="3" domainObject="userauthset_CopyAuth_waitUserDatagrid_id">
						<th data-options="field:'ID', halign:'center',checkbox:true" title="主键ID" width="20">主键ID</th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3" domainObject="userauthset_CopyAuth_waitUserDatagrid_name">
						<%-- 用户姓名 --%>
						<th data-options="field:'NAME', halign:'center', align:'center', sortable:false,editor:{type:'text'}" width="200" title="用户姓名"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.userName","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3" domainObject="userauthset_CopyAuth_waitUserDatagrid_name">
						<%-- 登录名 --%>
						<th data-options="field:'LOGIN_NAME', halign:'center', align:'center', sortable:false,editor:{type:'text'}" width="200" title="用户编号"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.loginName","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3" domainObject="userauthset_CopyAuth_waitUserDatagrid_deptName">
						<%-- 部门 --%>
						<th data-options="field:'DEPT_NAME', halign:'center', align:'center', sortable:false,editor:{type:'text'}" width="200" title="部门"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.dept","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3" domainObject="userauthset_CopyAuth_waitUserDatagrid_roleName">
						<%-- 角色 --%>
						<th data-options="field:'ROLE_NAME', halign:'center', align:'center', sortable:false,editor:{type:'text'}" width="200" title="角色"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.part","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3" domainObject="userauthset_CopyAuth_waitUserDatagrid_positionName">
						<%-- 岗位 --%>
						<th data-options="field:'POSITION_NAME', halign:'center', align:'center', sortable:false,editor:{type:'text'}" width="200" title="岗位"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.post","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
				</tr>
			</thead>
		</table>
		<!-- 待选择用户 end -->
	</div>
	<div data-options="region:'center',split:true" style="width: 220px;">
		<!-- 目标用户列表 begin -->
		<div id="toolbarAuthEntry" class="datagrid-toolbar" style="height: 40px; display: block;">
			<sec:accesscontrollist hasPermission="3" domainObject="userauthset_CopyAuth_button_saveCopyToTargetUser">
				<%-- 保存 --%>
				<td width="70px;"><a style="margin-top:7px;margin-left:20px;" title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table2.button.save","i18n.lantop",locale)%>" class="easyui-linkbutton  selbtnc" iconCls="icon-im-save"  onclick="saveCopyToTargetUser();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table2.button.save","i18n.lantop",locale)%></a></td>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3" domainObject="userauthset_CopyAuth_button_deleteCopyToTargetUser">
				<%-- 删除 --%>
				<td width="70px;"><a title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table2.button.delete","i18n.lantop",locale)%>" class="easyui-linkbutton selbtnc" iconCls="icon-im-remove"  onclick="deleteCopyToTargetUser();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table2.button.delete","i18n.lantop",locale)%></a></td>
			</sec:accesscontrollist>
		</div>
		<table id="targetUserDatagrid" class="easyui-datagrid" data-options="
						animate: false,
						collapsible: false,
						fitColumns: true,
						autoRowHeight: false,
						singleSelect: false,
						pagination:false,
						pageNumber:0,
						pageSize:10, 
						pageList:[10,30,50],
			    		striped:true,
						fit:true,
						toolbar:'#toolbarAuthEntry',
						method: 'post'
					">
			<thead>
				<tr>
					<sec:accesscontrollist hasPermission="3" domainObject="userauthset_CopyAuth_targetUserDatagrid_id">
						<th data-options="field:'ID', halign:'center',checkbox:true" title="主键ID" width="20">主键ID</th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3" domainObject="userauthset_CopyAuth_targetUserDatagrid_name">
						<%-- 用户 --%>
						<th data-options="field:'NAME', halign:'center', align:'center', sortable:false,editor:{type:'text'}" width="200" title="用户"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table2.user","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3" domainObject="userauthset_CopyAuth_targetUserDatagrid_deptName">
						<%-- 部门 --%>
						<th data-options="field:'DEPT_NAME', halign:'center', align:'center', sortable:false,editor:{type:'text'}" width="200" title="部门"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table2.dept","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3" domainObject="userauthset_CopyAuth_targetUserDatagrid_roleName">
						<%-- 角色 --%>
						<th data-options="field:'ROLE_NAME', halign:'center', align:'center', sortable:false,editor:{type:'text'}" width="200" title="角色"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table2.part","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
				</tr>
			</thead>
		</table>
		<!-- 目标用户列表 end -->
	</div>

	<!-- 用户查询区域 -->
	<div id="searchDialog" data-options="iconCls:'icon-search',resizable:false,modal:false,buttons:'#searchBtns'" style="width: 600px; height: 220px; display: none;">
		<form id="searchForm">
			<table class="form_commonTable">
				<tr>
					<%-- 用户姓名 --%>
					<th width="15%"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.button.search.userName","i18n.lantop",locale)%>：</th>
					<td width="35%"><input name="userName" id="userName" class="easyui-validatebox" />
					<%-- 登录名 --%>
					<th width="15%"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.button.search.loginName","i18n.lantop",locale)%>：</th>
					<td><input name="userCode" id="userCode" class="easyui-validatebox" />
				</tr>
				<tr>
					<%-- 部门 --%>
					<th><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.button.search.dept","i18n.lantop",locale)%>:</th>
					<td>
						 <input class="easyui-validatebox validatebox-text" type="hidden" name="deptId" id="deptId" value="">
				        <div class="">
					        <div class="selector-div selector-div-bg" style="width: 708px;">
					        	<input class="easyui-validatebox validatebox-text selector-div-input" name="deptNameAlias" id="deptNameAlias" readonly="readOnly" style="width: 674px;">
					        	<span class="input-right-icon" id="deptNameAlias-iconspan" onclick="authSelectDept();"></span>
					        	<input type="hidden" id="authSelectedDeptId"/>
					        </div>
				        </div>
					</td>
					<%-- 角色 --%>
					<th><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.button.search.part","i18n.lantop",locale)%>:</th>
					<td>
						 <input class="easyui-validatebox validatebox-text" type="hidden" name="roleId" id="roleId" value="">
				        <div class="">
					        <div class="selector-div selector-div-bg" style="width: 708px;">
					        	<input class="easyui-validatebox validatebox-text selector-div-input" name="roleNameAlias" id="roleNameAlias" readonly="readOnly" style="width: 674px;">
					        	<span class="input-right-icon" id="roleNameAlias-iconspan" onclick="authSelectRole();"></span>
					        	<input type="hidden" id="authSelectedRoleId"/>
					        </div>
				        </div>
					</td>
				</tr>
				<tr>
					<%-- 岗位 --%>
					<th><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.button.search.post","i18n.lantop",locale)%>:</th>
					<td>
						 <input class="easyui-validatebox validatebox-text" type="hidden" name="positionId" id="positionId" value="">
				        <div class="">
					        <div class="selector-div selector-div-bg" style="width: 708px;">
					        	<input class="easyui-validatebox validatebox-text selector-div-input" name="positionNameAlias" id="positionNameAlias" readonly="readOnly" style="width: 674px;">
					        	<span class="input-right-icon" id="positionNameAlias-iconspan" onclick="authSelectPosition();"></span>
					        	<input type="hidden" id="authSelectedPositionId"/>
					        </div>
				        </div>
					</td>
				</tr>
			</table>
		</form>
		<div id="searchBtns" class="datagrid-toolbar foot-formopera" style="padding-bottom: 5px">
			<table class="tableForm" border="0" cellspacing="1" width='100%'>
				<tr>
					<%-- 查询 --%>
					<td align="center"><a class="easyui-linkbutton selbtnc"  iconCls="icon-im-search" onclick="searchUserDatas();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.button.search.button.search","i18n.lantop",locale)%></a>
					<%-- 清空 --%>
					<a class="easyui-linkbutton  selbtnc"  onclick="clearData();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.button.search.button.clean","i18n.lantop",locale)%></a>
					<%-- 返回 --%>
					<a class="easyui-linkbutton  selbtnc" iconCls="icon-im-back" onclick="closeSearch();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy.table.button.search.button.return","i18n.lantop",locale)%></a></td>
				</tr>
			</table>
		</div>
	</div>
	<script type="text/javascript" src="static/js/platform/index/js/divscroll.js" ></script>
   <script>
	$(function(){
		$(".datagrid-view2").find(".datagrid-body").perfectScrollbar();
	});
  </script>
</body>
</html>
